/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-12-15 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 列表查询
export const getList = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsTransfer/listRecord`, params)
// 详情查询
export const getDetail = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsTransfer/getByTransferId`, {params})
// 保存
export const postSave = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsTransfer/addOrUpdate`, params)
// 批量确认
export const postConfirm = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsTransfer/confirm`, params)
// 仓库选择列表
export const getWarehouseList = (params) => axios.get(`${SERVER.WHOLESALES}/ttVsTransfer/getWarehouseList`, {params})
// 批量导入
export const importStorage = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsTransfer/upload`, params)
// 车明细列表
export const getVinlist = (params) => axios.post(`${SERVER.WHOLESALES}/ttVsTransfer/listVehicleRecord`, params)
// 车辆配置五级选择
export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, { params: { type: id, level: 6, ...params } });
// 模板下载
export const excelList = params => {
  const url = `${SERVER.WHOLESALES}/ttVsTransfer/download`;
  return axios({
    url,
    method: 'get',
    responseType: 'blob',
    params:params,
  });
};
